Control Of A Rotary Inverted Pendulum